<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Type extends Model
{
    use SoftDeletes;
    protected $table = 'type';

    public function getList($model){
    	$list = $this->where("model",$model)->get();
    	return $list;
    }

    public function getListState($model){
    	return $this->where(["model"=>$model, "state"=>1])->select("id", "title")->get();
    }
}
